package com.kaifamiao.www.demo.Do25;

public class Test01 {
    public static void main(String[] args) {

        Person ikun = new Person();
        ikun.name = "小黑子";
        ikun.gender = "男";
        ikun.age = 1;

        Person kun = new Person();
        kun.name = "苏珊";
        kun.gender = "女";
        kun.age = 2;

        Person kunge = new Person();
        kunge.name = "黑坤";
        kunge.gender = "男";
        kunge.age = 3;

        //定义Person类型的数组，并初始化数组元素
        Person[] persons = new Person[]{ikun, kun, kunge};
        for(int i = 0; i < persons.length; i++){
            System.out.println(persons[i].name+","+persons[i].gender+","+persons[i].age);
        }

    }
}
